package com.ruoyi.supplier.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbSupplierMapper;
import com.ruoyi.supplier.domain.TbSupplier;
import com.ruoyi.supplier.service.ITbSupplierService;

/**
 * 药品供应商Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class TbSupplierServiceImpl implements ITbSupplierService 
{
    @Autowired
    private TbSupplierMapper tbSupplierMapper;

    /**
     * 查询药品供应商
     * 
     * @param supplierId 药品供应商主键
     * @return 药品供应商
     */
    @Override
    public TbSupplier selectTbSupplierBySupplierId(Long supplierId)
    {
        return tbSupplierMapper.selectTbSupplierBySupplierId(supplierId);
    }

    /**
     * 查询药品供应商列表
     * 
     * @param tbSupplier 药品供应商
     * @return 药品供应商
     */
    @Override
    public List<TbSupplier> selectTbSupplierList(TbSupplier tbSupplier)
    {
        return tbSupplierMapper.selectTbSupplierList(tbSupplier);
    }

    /**
     * 新增药品供应商
     * 
     * @param tbSupplier 药品供应商
     * @return 结果
     */
    @Override
    public int insertTbSupplier(TbSupplier tbSupplier)
    {
        return tbSupplierMapper.insertTbSupplier(tbSupplier);
    }

    /**
     * 修改药品供应商
     * 
     * @param tbSupplier 药品供应商
     * @return 结果
     */
    @Override
    public int updateTbSupplier(TbSupplier tbSupplier)
    {
        return tbSupplierMapper.updateTbSupplier(tbSupplier);
    }

    /**
     * 批量删除药品供应商
     * 
     * @param supplierIds 需要删除的药品供应商主键
     * @return 结果
     */
    @Override
    public int deleteTbSupplierBySupplierIds(Long[] supplierIds)
    {
        return tbSupplierMapper.deleteTbSupplierBySupplierIds(supplierIds);
    }

    /**
     * 删除药品供应商信息
     * 
     * @param supplierId 药品供应商主键
     * @return 结果
     */
    @Override
    public int deleteTbSupplierBySupplierId(Long supplierId)
    {
        return tbSupplierMapper.deleteTbSupplierBySupplierId(supplierId);
    }
}
